import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {ListComponent} from './list/list.component';
import {AddComponent} from './add/add.component';

const routes: Routes = [
    {
        path: '',
        pathMatch: 'full',
        redirectTo: 'list'
    }, {
        path: 'list',
        component: ListComponent,
    }, {
        path: 'add',
        component: AddComponent,
    }, {
        path: 'add/:id',
        component: AddComponent,
    }
];

@NgModule({
    imports: [RouterModule.forChild(routes)],
    exports: [RouterModule]
})
export class BusinessRoutingModule {
}
